from apps.seleuinms.process.common import request3
from apps.seleuinms.requests import YzyhRequest

BASE_YZYH_URL = "http://22.230.57.12:8080"

_YZYH_ = {
    'LOGIN_URL': '/login',
    "TASK_LIST_URL": "/backlog/iBacklog/taskList"
}

YZYH_REQUEST_URL = {}

for key in _YZYH_:
    YZYH_REQUEST_URL[key] = BASE_YZYH_URL + _YZYH_[key]


def get_house_qz(collat_id, cookies):
    url = 'http://22.230.57.12:8080/warrantInfo/queryWarrantInfoList'
    params = {
        'collatId': collat_id,
        'provCode': '3200',
        'deledFlag': '0',
    }
    return request3(url, params, cookies)


def get_business_item(business_key, cookies):
    url = 'http://22.230.57.12:8080/bussAccept/historyView/get'
    params = {
        'busiNo': business_key,
        'classifyCode': 'root068',
        'state': '3',
        'provCode': '3200',
        'createInstNo': '32017180',
    }
    return request3(url, params, cookies)
